TINYDOC-3565 - Fix insert and remove order for the id 2 edit in Suggested Edits demo models - #4298
Merged
Merged
Conversation
…sted Edits demo models
metricjs
approved these changes
Jul 29, 2026
MitchC1999
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: TINYDOC-3565
Site: Staging branch
Changes:
insertandremovetext runs for the"id":2edit in thesuggestededits-modelattribute, so the pair readsremovetheninsert. Applied to all four Suggested Edits demos, whosecontentsarrays are identical:modules/ROOT/examples/live-demos/suggestededits/index.htmlmodules/ROOT/examples/live-demos/suggestededits-auto-approve/index.htmlmodules/ROOT/examples/live-demos/suggestededits-access-read/index.htmlmodules/ROOT/examples/live-demos/suggestededits-access-feedback/index.htmlWhat was broken
The
"id":2modification in the second paragraph listed its inserted run before its removed run. A modification tracked under a single op id is emitted as the removed run followed by the inserted run, so the demo displayed a modification in the reverse of the order the plugin produces.What the fix does
Reorders the two runs so the review view shows the deletion followed by the insertion.
Try out the Suggested Edits feature by typing in the editor and then clicking the Review Changes button in the toolbar.Try out the Suggested Edits feature: type in the editor, apply formatting or delete some content. Then, click the Review Changes button in the toolbar to see your changes.The accept-all text continues to match the static HTML in each demo's textarea body.
Pre-checks:
hotfix/8/TINYDOC-3565Review: